package org.example.controller;

import org.example.pojo.Log;
import org.example.pojo.Result;
import org.example.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class LogController {
    @Autowired
    private LogService logService;

    @RequestMapping("/logs")
    private Result list() {
        List<Log> logList = logService.findAll();
        //3. 响应结果
        return Result.success(logList);
    }

}
